import axios from 'axios';
import MX from '@/utils/myAxios';
export const verifyUserAPI = (username) =>
  axios.get(`http://xawn.f3322.net:8012/user/check/${username}`);
export const loginAPI = (data) =>
  MX('http://xawn.f3322.net:8012/login', 'post', data);
export const getUsersAPI = (data) =>
  MX('http://xawn.f3322.net:8012/user', 'get', data);
export const addUserAPI = (data) =>
  MX('http://xawn.f3322.net:8012/user', 'post', data);
export const modiUserAPI = (data) =>
  MX('http://xawn.f3322.net:8012/role', 'put', data);
export const getDeptsAPI = () => MX('http://xawn.f3322.net:8012/dept', 'get');
//修改用户数据
export const updateUserAPI = (data) =>
  MX('http://xawn.f3322.net:8012/user', 'put', data);
